<template>
    <div>
        <label>关键词：<input v-model="keyword"></label>
        <label>地区：<input v-model="location"></label>
        <baidu-map>
            <bm-view class="map"></bm-view>
            <bm-local-search :keyword="keyword" :auto-viewport="true" :location="location"></bm-local-search>
        </baidu-map>
    </div>
</template>
<script>
export default {
    data() {
        return {
            location: '北京',
            keyword: '北京'
        };
    },
    mounted() {
        cancelAnimationFrame
    },
    methods: {

    },
}
</script>

<style scoped>
.map {
    /* 必须要给容器设置大小  否则地图无法渲染*/
    width: 100%;
    height: 500px;
}
</style>